home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!cs.utexas.edu!sun-barr!cronkite.Central.Sun.COM!exodus!trantor.harris-atd.com
- From: chuck@trantor.harris-atd.com (Chuck Musciano)
- Newsgroups: comp.sources.x
- Subject: v14i004: contool, Patch1, Part01/01
- Message-ID: <19069@exodus.Eng.Sun.COM>
- Date: 27 Aug 91 05:31:33 GMT
- References: <csx-14i004-contool@uunet.UU.NET>
- Sender: news@exodus.Eng.Sun.COM
- Lines: 340
- Approved: argv@sun.com
-
- Submitted-by: Chuck Musciano <chuck@trantor.harris-atd.com>
- Posting-number: Volume 14, Issue 4
- Archive-name: contool/patch1
- Patch-To: contool: Volume 10, Issue 34-40
- Patch-To: contool: Volume 10, Issue 78
- Patch-To: contool: Volume 11, Issue 5
- Patch-To: contool: Volume 13, Issue 54 55
-
- This is patch 1 to Contool 3.1, bringing Contool to version 3.1a. This
- patch fixes a few typos in the man page, provides better support for console
- message lacking trailing newlines, and supports saving its command line
- options upon receipt of appropriate signals from a window manager.
-
- You'll need Contool 3.1 to apply these patches. Contool 3.1 is available
- via FTP and archive server from uunet.uu.net, and via FTP from
- trantor.harris-atd.com, in the /pub/suntools/contool directory.
-
-
- Chuck Musciano ARPA : chuck@trantor.harris-atd.com
- Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck
- PO Box 37, MS 3A/1912 AT&T : (407) 727-6131
- Melbourne, FL 32902 FAX : (407) 729-3363
-
- A good newspaper is never good enough,
- but a lousy newspaper is a joy forever. -- Garrison Keillor
-
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 07/31/1991 11:48 UTC by chuck@melmac
- # Source directory /home/chuck/projects/release/contool/3.1/patch01
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 8711 -rw-rw-r-- patch
- #
- # ============= patch ==============
- if test -f 'patch' -a X"$1" != X"-c"; then
- echo 'x - skipping patch (File already exists)'
- else
- echo 'x - extracting patch (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'patch' &&
- *** Imakefile.orig Wed Jul 24 09:15:40 1991
- --- Imakefile Fri May 31 08:03:38 1991
- ***************
- *** 8,15 ****
- X
- X LDOPTIONS = -L$(OPENWINHOME)/lib
- X
- ! CFLAGS = -O -I$(OPENWINHOME)/include -DMAILER=\"$(MAILER)\"
- X
- X SRCS = about.c busy.c contool.c contool_ui.c error.c expand.c filename_completion.c \
- X filters.c getopt.c load.c load_icon.c logging.c misc.c parse.y \
- X pinned_menu_notify.c place_dialog.c props.c regexp.c send_mail.c store.c
- --- 8,19 ----
- X
- X LDOPTIONS = -L$(OPENWINHOME)/lib
- X
- ! CPPFLAGS = -I$(OPENWINHOME)/include
- X
- + CFLAGS = -O -DMAILER=\"$(MAILER)\"
- +
- + EXTRA_INCLUDES = -I$(OPENWINHOME)/include
- +
- X SRCS = about.c busy.c contool.c contool_ui.c error.c expand.c filename_completion.c \
- X filters.c getopt.c load.c load_icon.c logging.c misc.c parse.y \
- X pinned_menu_notify.c place_dialog.c props.c regexp.c send_mail.c store.c
- ***************
- *** 20,24 ****
- X
- X ComplexProgramTarget(contool)
- X
- ! install:: install.man
- X $(INSTALL) -c $(INSTMANFLAGS) contool.info $(HELPDIR)/contool.info
- --- 24,30 ----
- X
- X ComplexProgramTarget(contool)
- X
- ! install: install.man install.help
- !
- ! install.help:
- X $(INSTALL) -c $(INSTMANFLAGS) contool.info $(HELPDIR)/contool.info
- *** README.orig Wed Jul 24 09:15:40 1991
- --- README Wed Jul 24 09:15:33 1991
- ***************
- *** 16,22 ****
- X /* of Harris Corporation. */
- X /************************************************************************/
- X
- ! Contool Version 3.1
- X
- X Contool will capture and display system console messages with timestamps.
- X It is a replacement for the standard Sun console, which is created with
- --- 16,22 ----
- X /* of Harris Corporation. */
- X /************************************************************************/
- X
- ! Contool Version 3.1a
- X
- X Contool will capture and display system console messages with timestamps.
- X It is a replacement for the standard Sun console, which is created with
- ***************
- *** 198,205 ****
- X Contool now sets its class and name hints.
- X Sending SIGUSR1 (30) to contool stops blinking,
- X suggested by Frank Peters.
- ! Sending SIGHUP (1) closes and reopens the log file.
- X Added "Apply and Save" button to filter dialog.
- X Added individual message logging.
- X Finally fixed overflow handling.
- X Added multi-line filter timeout.
- --- 198,213 ----
- X Contool now sets its class and name hints.
- X Sending SIGUSR1 (30) to contool stops blinking,
- X suggested by Frank Peters.
- ! Sending SIGHUP (1) closes and reopens the log
- ! file.
- X Added "Apply and Save" button to filter dialog.
- X Added individual message logging.
- X Finally fixed overflow handling.
- X Added multi-line filter timeout.
- + 3.1a 24 Jul 91 Added support for WIN_CMDLINE attribute,
- + from Tomas Stephanson
- + (Tomas.Stephanson@eua.ericsson.se)
- + Fixed handling of messages without trailing
- + newlines, suggested by Ellery Chan
- + (ellery@trantor.harris-atd.com)
- + Fixed typos in the man page
- *** contool.man.orig Wed Jul 24 09:15:41 1991
- --- contool.man Fri Jun 28 11:21:47 1991
- ***************
- *** 1,8 ****
- ! .TH CONTOOL 1 "13 October 1989"
- X .SH NAME
- X contool \- capture and display console output
- X .SH SYNOPSIS
- ! contool [\fB\(hyf\fP \fIfile\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP] [\f3\(hyn\fP]
- X .SH DESCRIPTION
- X .LP
- X \f2Contool\fP captures and displays any messages sent to the system console.
- --- 1,8 ----
- ! .TH CONTOOL 1 "28 June 1991"
- X .SH NAME
- X contool \- capture and display console output
- X .SH SYNOPSIS
- ! contool [\fB\(hyc\fP \fIfile\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP] [\f3\(hyn\fP]
- X .SH DESCRIPTION
- X .LP
- X \f2Contool\fP captures and displays any messages sent to the system console.
- *** contool.c.orig Wed Jul 24 09:15:44 1991
- --- contool.c Mon Jul 22 15:33:22 1991
- ***************
- *** 499,511 ****
- X Filter *f;
- X int count, do_blink = FALSE, do_open = FALSE;
- X static char in_buf[INPUT_BUFFER_SIZE + 2];
- X
- ! while ((count = read(fileno(master), in_buf, INPUT_BUFFER_SIZE)) >= 0) {
- ! in_buf[count] = '\0';
- ! while (s = index(in_buf, '\015')) {
- X strcpy(s, s + 1);
- - count--;
- - }
- X for (t = in_buf; *t; *s = old_c, t = s) {
- X if (s = index(t, '\n')) {
- X old_c = *++s;
- --- 499,511 ----
- X Filter *f;
- X int count, do_blink = FALSE, do_open = FALSE;
- X static char in_buf[INPUT_BUFFER_SIZE + 2];
- + static int leftover = 0;
- X
- ! while ((count = read(fileno(master), in_buf + leftover, INPUT_BUFFER_SIZE - leftover)) >= 0) {
- ! in_buf[count + leftover] = '\0';
- ! leftover = 0;
- ! while (s = index(in_buf, '\015'))
- X strcpy(s, s + 1);
- X for (t = in_buf; *t; *s = old_c, t = s) {
- X if (s = index(t, '\n')) {
- X old_c = *++s;
- ***************
- *** 512,519 ****
- X *s = '\0';
- X }
- X else {
- ! s = t + strlen(t);
- ! old_c = '\0';
- X }
- X if (!defaults.log_after)
- X write_log(t);
- --- 512,520 ----
- X *s = '\0';
- X }
- X else {
- ! leftover = strlen(t);
- ! strcpy(in_buf, t);
- ! break;
- X }
- X if (!defaults.log_after)
- X write_log(t);
- ***************
- *** 608,627 ****
- --- 609,637 ----
- X
- X { char *s, c, path[1024], *log_file = NULL;
- X int log = FALSE;
- + static char cmdline[MAXPATHLEN + 10];
- X
- X sprintf(path, "%s/.contool", getenv("HOME"));
- X filter_file = strsave(path);
- X
- + cmdline[0] = NULL;
- +
- X while ((c = getopt(argc, argv, "c:lL:n?", &s)) != EOF)
- X switch (c) {
- X case 'c' : filter_file = expand_tilde(s);
- X explicit_filters = TRUE;
- + strcat(cmdline, " -c ");
- + strcat(cmdline, filter_file);
- X break;
- X case 'l' : log = TRUE;
- + strcat(cmdline, " -l");
- X break;
- X case 'L' : log_file = expand_tilde(s);
- + strcat(cmdline, " -L ");
- + strcat(cmdline, log_file);
- X break;
- X case 'n' : no_console = TRUE;
- + strcat(cmdline, " -n");
- X break;
- X case '?' : fprintf(stderr, ct_usage);
- X exit(0);
- ***************
- *** 629,634 ****
- --- 639,647 ----
- X default : fprintf(stderr, ct_usage);
- X exit(1);
- X }
- +
- + if (strlen(cmdline) > 0)
- + xv_set(contool_base->base, WIN_CMD_LINE, cmdline, NULL);
- X
- X if (lex_init(filter_file)) {
- X yyparse();
- *** contool_ui.c.orig Wed Jul 24 09:15:46 1991
- --- contool_ui.c Wed Jul 24 09:13:28 1991
- ***************
- *** 349,355 ****
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 575,
- X XV_HEIGHT, 246,
- ! XV_LABEL, "Contool 3.1",
- X FRAME_CLOSED, FALSE,
- X FRAME_SHOW_FOOTER, TRUE,
- X FRAME_SHOW_RESIZE_CORNER, TRUE,
- --- 349,355 ----
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 575,
- X XV_HEIGHT, 246,
- ! XV_LABEL, "Contool 3.1a",
- X FRAME_CLOSED, FALSE,
- X FRAME_SHOW_FOOTER, TRUE,
- X FRAME_SHOW_RESIZE_CORNER, TRUE,
- ***************
- *** 2133,2143 ****
- X obj = xv_create(owner, PANEL_MESSAGE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:message1",
- ! XV_X, 217,
- X XV_Y, 14,
- X XV_WIDTH, 75,
- X XV_HEIGHT, 13,
- ! PANEL_LABEL_STRING, "Contool 3.1",
- X PANEL_LABEL_BOLD, TRUE,
- X NULL);
- X return obj;
- --- 2133,2143 ----
- X obj = xv_create(owner, PANEL_MESSAGE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:message1",
- ! XV_X, 212,
- X XV_Y, 14,
- X XV_WIDTH, 75,
- X XV_HEIGHT, 13,
- ! PANEL_LABEL_STRING, "Contool 3.1a",
- X PANEL_LABEL_BOLD, TRUE,
- X NULL);
- X return obj;
- *** filename_completion.c.orig Wed Jul 24 09:15:50 1991
- --- filename_completion.c Wed Jul 17 15:42:21 1991
- ***************
- *** 41,47 ****
- X
- X switch (event_action(event)) {
- X case '\n' :
- ! case '\r' :
- X case ' ' : if ((p = expand_filename((char *) xv_get(item, PANEL_VALUE))) == NULL)
- X window_bell(xv_get(item, XV_OWNER));
- X else
- --- 41,47 ----
- X
- X switch (event_action(event)) {
- X case '\n' :
- ! case '\r' :
- X case ' ' : if ((p = expand_filename((char *) xv_get(item, PANEL_VALUE))) == NULL)
- X window_bell(xv_get(item, XV_OWNER));
- X else
- *** patchlevel.h.orig Wed Jul 24 09:15:56 1991
- --- patchlevel.h Mon Jul 22 15:35:48 1991
- ***************
- *** 33,37 ****
- --- 33,41 ----
- X /* comp.sources.x: Volume 11, Issue 4 */
- X /* */
- X /* 4 Release of version 3.1; see README for details */
- + /* comp.sources.x: Volume 13, Issues 54 & 55 */
- + /* */
- + /* 5 Bug fixes; see README for details */
- + /* comp.sources.x: Volume ??, Issue ?? */
- X /* */
- X /************************************************************************/
- SHAR_EOF
- chmod 0664 patch ||
- echo 'restore of patch failed'
- Wc_c="`wc -c < 'patch'`"
- test 8711 -eq "$Wc_c" ||
- echo 'patch: original size 8711, current size' "$Wc_c"
- fi
- exit 0
-
- --
- Dan Heller
- O'Reilly && Associates Z-Code Software Comp-sources-x:
- Senior Writer President comp-sources-x@uunet.uu.net
- argv@ora.com argv@zipcode.com
-